<template>
    <!--<div class="header">
      <div class="header-left header-item"><img src="../assets/icon/left.png" alt=""></div>
      <div class="header-title header-item "><slot></slot></div>
      <div class="header-right header-item"></div>
    </div>-->
  <div class="fastHeader">
  <van-nav-bar
    :title="''||this.$route.meta.title"
    :left-text="''||this.$route.meta.leftText"
    :right-text="''||this.$route.meta.rightText"
    left-arrow
    @click-left="toggle"
  />
 </div>
</template>

<script>
    export default {
        name: "fast-header",
        methods:{
          toggle(){
            /*if(){

            }*/

            this.$routes.push(''+this.$route.meta.go);
     /*       this.$routes.push('/')*/
          }
      },mounted(){
        console.log(this.$route);
        console.log(this.$route.meta.title)
        /*$route为当前router跳转对象里面可以获取name、path、query、params等

        $router为VueRouter实例，想要导航到不同URL，则使用$router.push方法

        返回上一个history也是使用$router.go方法*/
        // console.log(this.$routes.options.routes[0].children[0]);
        // console.log(this.$routes.options.routes[0].children[0].children);
        // console.log(this.$routes.options.routes[0].children[0].children[6].meta);
      }
    }
</script>

<style>
  //标签页样式
  .fastHeader >>>van-nav-bar::after{
     border-bottom: none;
  }
  .van-hairline--bottom::after{
    border-bottom-width: 0;
  }
  .van-icon{
    color: #000;
  }
  .van-nav-bar__text{
    color: #666;
  }
/* .header{
   width: 100vw;
   height: 1.3333rem;
   background: #fff;
 }
  .header-item{
    display: inline-block;
    width: 33.33%;
    height: 1.3333rem;
    line-height: 1.3333rem;
    box-sizing: border-box;
    float: left;
    vertical-align: middle;
  }
  .header-left img{
    display: inline-block;
    padding-left: .53333rem;
    width: .53333rem;
    height: .53333rem;
    line-height: 1.3333rem;
    vertical-align: middle;
  }
 .header-title{
   text-align: center;
   font-size: .42666rem;
   color: #666;
   vertical-align: middle;
 }*/
</style>
